<%
var containerParam = {
	title: '用户管理',
	currentMenu: 'user',
	jsArray: [ctxPath + '/js/user/form.js'],
	breadcrumbMap: {
		'首页': ctxPath + '/',
		'用户管理': ctxPath + '/user/list',
		'添加/编辑': null
	}
};
layout('/common/_website_container.html', containerParam){
%>
<div class="layui-card">
	<div class="layui-card-body padding-15">
		<form class="layui-form">
			<#formhidden name="id"/>
			<% if (isEmpty(entity)) { %>
			<#forminput label="*用户名" name="username" verify="required"/>
			<% } else { %>
			<#forminput label="用户名" value="${entity.username}" disabled=""/>
			<% } %>
			<#formimage label="头像" id="avatar" name="avatar"/>
			<#forminput label="*昵称" name="name" verify="required"/>
			<#formselect label="*性别" name="sex" value="${entity.sex.value!}" itemValue="value" itemDesc="desc" items="${@Sex.values()}" verify="required"/>
			<#formselect label="客户端" name="client" value="${entity.client.value!}" itemValue="value" itemDesc="desc" items="${@UserClient.values()}"/>
			<#forminput label="py码" name="pyCode"/>
			<#formselect label="*状态" name="status" value="${entity.status.value!}" itemValue="value" itemDesc="desc" items="${@UserStatus.values()}" verify="required"/>
			<#formselects label="角色" name="roles" value="${@EnumUtils.toValueList(userRoles)}" itemValue="value" itemDesc="cName" items="${@Role.values()}"/>
			<#formsubmit/>
		</form>
	</div>
</div>
<% } %>
